package com.he.security.core;

import java.io.Serializable;
import java.security.Principal;
import java.util.Collection;

/**
 * 相当于token 用于认证或认证主体
 * 一旦请求被{@link AuhthenticationManager}
 */
public interface Authentication extends Principal, Serializable {

    Collection<? extends GrantedAuthority> getAuthorities();

    Object getCredentials();

    Object getDetails();

    Object getPrincipal();

    boolean isAuthenticated();

    void setAuthenticated(boolean isAuthenticated) throws IllegalArgumentException;

}
